# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Metastore.V1.Model.AuxiliaryVersionConfig do
  @moduledoc """
  Configuration information for the auxiliary service versions.

  ## Attributes

  *   `configOverrides` (*type:* `map()`, *default:* `nil`) - Optional. A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.
  *   `networkConfig` (*type:* `GoogleApi.Metastore.V1.Model.NetworkConfig.t`, *default:* `nil`) - Output only. The network configuration contains the endpoint URI(s) of the auxiliary Hive metastore service.
  *   `version` (*type:* `String.t`, *default:* `nil`) - Optional. The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :configOverrides => map() | nil,
          :networkConfig => GoogleApi.Metastore.V1.Model.NetworkConfig.t() | nil,
          :version => String.t() | nil
        }

  field(:configOverrides, type: :map)
  field(:networkConfig, as: GoogleApi.Metastore.V1.Model.NetworkConfig)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.Metastore.V1.Model.AuxiliaryVersionConfig do
  def decode(value, options) do
    GoogleApi.Metastore.V1.Model.AuxiliaryVersionConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Metastore.V1.Model.AuxiliaryVersionConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
